<!doctype html>
<html lang="zh">
<head>
  <meta charset="gb2312">
  <meta http-equiv="Content-Type" content="text/html">
  <title>D3.js test</title>
  <meta name="author" content="Chris Wong">
  <!-- <link rel="stylesheet" href="css/style.css"> -->
  <script src="d3.js"></script>

</head>

<body>

</body>
<script>
var width = 400;
var height = 400;
//在 body 里添加一个 SVG 画布
var svg = d3.select("body")
	.append("svg")
	.attr("width",width)
	.attr("height",height);
//画布周边的空白
var padding = {left:30,right:30,top:20,bottom:20};
//定义一个数组
var dataset = [10,20,30,40,33,24,12,5];
//x轴的比例尺
var xScale = d3.scale.linear()
	.domain(d3.range())
</script>
</html>